package main

import "fmt"

func main()  {
	s := make([]string, 3)
	fmt.Println("empty:",s)

	s[0] = "a"
	s[1] = "b"
	s[2] = "c"
	fmt.Println("set:",s)
	fmt.Println("get:",s[2])
	fmt.Println("length:",len(s))

	s = append(s,"d")
	s = append(s,"e","f")
	fmt.Println("append:",s)
	//[a b c d e f]

	c := make([]string,len(s))
	copy(c,s)
	fmt.Println("copyC:",c)

	l := s[2:5]
	fmt.Println("slice1:",l)
	//[c d e]

	l = s[:5]
	fmt.Println("slice2:",l)
	//[a b c d e f]

	l = s[2:]
	fmt.Println("slice3:",l)
	//[c d e f]
}
